package com.scalar.chiptrack.sales.forms;

import java.util.Calendar;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;

import com.scalar.chiptrack.ChipTrackActionForm;


/**
 * Form bean for 
 *
 * @author Kesava Kumar Achanala
 * @version $Revision: 1.1.1.1 $ $Date: 2006/12/11 23:43:20 $
 */




public final class SalesHoldForm extends ChipTrackActionForm {


    // --------------------------------------------------- Instance Variables
    
    private String customerPO = null;
    private int customerId = -1;
    private String productName = null;
    private String action = null;
    // Prabhanjan (25 Mar 2004)
    private String year = Integer.toString ( Calendar.getInstance ().get ( Calendar.YEAR ) );

    // ----------------------------------------------------------- Properties
   
    public String getCustomerPO()
    {
        return customerPO;
    }
    
    public void setCustomerPO(String customerPO)
    {
        this.customerPO = customerPO;
    }
    
    public int getCustomerId()
    {
        return customerId;
    }
    
    public void setCustomerId(int customerId)
    {
        this.customerId = customerId;
    }
    
    public String getProductName()
    {
        return productName;
    }
    
    public void setProductName(String productName)
    {
        this.productName = productName;
    }
    
    public String getAction()
    {
        return action;
    }
    
    public void setAction(String action)
    {
        this.action = action;
    }

    public String getYear ()
    {
        return year;
    }

    public void setYear ( String year )
    {
        this.year = year;
    }

    // --------------------------------------------------------- Public Methods


    /**
     * Reset all properties to their default values.
     *
     * @param mapping The mapping used to select this instance
     * @param request The servlet request we are processing
     */
    public void reset(ActionMapping mapping, HttpServletRequest request) {

            //Need to try...

    }


    /**
     * Validate the properties that have been set from this HTTP request,
     * and return an <code>ActionErrors</code> object that encapsulates any
     * validation errors that have been found.  If no errors are found, return
     * <code>null</code> or an <code>ActionErrors</code> object with no
     * recorded error messages.
     *
     * @param mapping The mapping used to select this instance
     * @param request The servlet request we are processing
     */
    public ActionErrors validate(ActionMapping mapping,
                                 HttpServletRequest request) {

        ActionErrors errors = new ActionErrors();
        //if ((customerName == null) || (vendorName.length() < 1))
        //    errors.add("Vendor", new ActionError("error.vendor name.required"));

        return errors;

    }


}
